export default {
    data() {
        return {
            isShowT: false,
            authStatus: 0,
            authStatusTxt: ''
        };
    },
    methods: {
        async __getQueryGeneralSettingsId() {
            const res = await this.$Posting(`${this.$api.getQueryGeneralSettingsId}?settingCode=500010&tenantId=${this.projectInfo.tenantId}&projectId=${this.projectInfo.projectId}`);
            if (res.isSuccess) {
                this.authStatus = res.data.settingValue;
                if (this.authStatus == 0) {
                    await this.__getQueryGeneralSettingsId2();
                }
            }
        },
        async __getQueryGeneralSettingsId2() {
            const res = await this.$Posting(`${this.$api.getQueryGeneralSettingsId}?settingCode=500011&tenantId=${this.projectInfo.tenantId}&projectId=${this.projectInfo.projectId}`);
            if (res.isSuccess) {
                this.authStatusTxt = res.data.settingValue;
            }
        },
        async isShowAuthStatus() {
            await this.__getQueryGeneralSettingsId();
            this.showPopup = false;
            if (this.authStatus == 0) {
                this.isShowT = true;
                // wx.showToast({
                //     title: this.authStatusTxt || '请联系管家认证身份',
                //     icon: 'none',
                //     duration: 2000
                // });
            } else {
                uni.showTabBar();
                this.$Router.push({
                    name: 'identityAuthentication'
                });
                this.showPopup = false;
            }
        }
    }
};
